@extends('admin.layouts.app')
@section('css')
	<link href="{{asset('assets/plugins/select2/css/select2.min.css')}}" rel="stylesheet" type="text/css" />
 
@endsection
@section('content')


						
						

						
						<div class="row">
	

							<div class="col-sm-12">
								<div class="card-box">


									
		<div class="table-rep-plugin">
			<div class="table-responsive" >
				<table class="table m-0">

                                            <thead>
                                                <tr>
                                                    <th>Booking Time</th>
                                                    <th>Registration Number</th>
                                                    <th>Model</th>
                                                    <th>Class</th>
                                                    <th>Price/Min</th>
                                                    <th>Booking Time</th>
                                                    <th>Pick Up Time</th>
                                              <th>Complete Time</th>
                                              <th>Minutes</th>
                                              <th>Money</th>
                                                </tr>
                                            </thead>
                                            <tbody>
                                              @foreach($list as $k=>$v)
                                          <tr>
                                            <td>{{$v->booking_at}}</td>
                                            <td>{{$v->car_code}}</th>
                                            <td>{{$v->car_model}}</td>
                                            <td>{{$v->car_type}}</td>
                                           
                                            <td>{{$v->car_price}}</td>
                                            <td>{{$v->booking_at}}</td>
                                            <td>{{$v->picked_at}}</td>
                                            <td>{{$v->completed_at}}</td>
                                            <td>{{$v->minutes}}</td>
                                            <td>{{$v->money}}</td>
                                          </tr>
                                              @endforeach  
                                            </tbody>
                                        </table>
										</div>
{{$list->appends($where)->links()}}
									</div>

								</div>
							</div>
						</div>



<div class="modal fade" id="statusModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
  <div class="modal-dialog">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">
          &times;
        </button>
        <h4 class="modal-title" id="myModalLabel">
          操作
        </h4>
      </div>
       <form method="post" action="{{url('zadmin/product/sale-status')}}" >
      <div class="modal-body">
             
            <div class="form-group row">
                <label class="col-md-4 control-label">备注</label>
                <div class="col-md-8">
                  <textarea class="form-control" rows="5" name="remark" placeholder="备注"></textarea>
                </div>
            </div>
            <input type="hidden" name="id" id="product_id" value="" /> 
            <input type="hidden" name="status" id="status" value="">
       {{csrf_field()}}
      </div>
      <div class="modal-footer">
        <button type="button" class="btn btn-default" data-dismiss="modal">关闭
        </button>
        <button type="submit" class="btn btn-primary">
          确定
        </button>
      </div>
    </form>
    </div><!-- /.modal-content -->
  </div><!-- /.modal -->
</div>
 @endsection 
               
         

    @section('js')
        <script src="{{asset('assets/plugins/select2/js/select2.min.js')}}" type="text/javascript"></script>

      <script type="text/javascript">
      	var product_id = '';
      	var status = '';
      	$('.saleStatus').on('click',function(){
      		product_id = $(this).data('id');
      		status     = $(this).data('status');
      		$('#product_id').val(product_id);
      		$('#status').val(status);
      		$('#statusModal').modal('show');
      	});
      </script>
    @endsection    

